<html lang="en" xml:lang="en"><head>
<META http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><META name="description" content="The Directions widget provides a quick and efficient method of calculating directions between two or more locations using a network service."><meta name="content-language" content="en"><link href="rsrc/htmlhelp.css" rel="stylesheet" type="text/css"><title>Web AppBuilder for ArcGIS | Help - 
Directions widget</title>
                <script type="text/javascript" language="JavaScript">
                    var pathL  = self.location.pathname.split ("/");
                    var fname = pathL[pathL.length-1];
                    var i = fname.lastIndexOf (".htm");
                    if (i>=0) {
                    fname = fname.substring (0, i)
                    } else {
                    //??
                    }
                    if (self.location.hash) {
				    		      fname = fname + self.location.hash;
						        }
                    self.location.replace ("../index.html#//" + fname);
                </script>
                </head><!--Publication GUID: [GUID-E7D1C130-8F87-4109-8D61-E73A46083F52]--><!--Topic GUID: [GUID-0C7DE87A-F459-4306-9B31-D67C5712B2C9]--><body><div id="content"><div class="header"><h1>
Directions widget</h1><div id="breadcrumb"></div></div>
<p id="GUID-E195250E-92F7-4784-971F-88591C0061FC">
 The Directions widget provides a quick and efficient method of calculating turn-based directions between two or more locations.
This widget uses both a network route service and geocoder service.</p><div class="notes" id="GUID-8B926C41-4EBA-4FA0-A0A5-CD210F60E171"><div class="license"><img class="note_img" src="rsrc/license.png" alt="License" title="License"><span>License:</span></div><div class="tipbody"><p id="GUID-FCBC939B-D10D-4679-830A-A59E762DC27B"> The ArcGIS Online Network Analysis Services require an ArcGIS Online for Organizations subscription. If you choose to work with this by default, specify a valid user name and password for ArcGIS Online. Each successful request to the service incurs service credits taken from your subscription. In addition, if you have an ArcGIS Server Network Analysis service, you can also specify the URL.</p></div></div><div class="notes" id="GUID-09225AE5-F6AB-4980-B23B-08FBA82AF7FD"><div class="license"><img class="note_img" src="rsrc/license.png" alt="License" title="License"><span>License:</span></div><div class="tipbody"><p id="GUID-82165EA7-273F-4E7B-AD4D-278D16AD3E22"> The ArcGIS Online Real-Time Traffic Map Services require an ArcGIS Online for Organizations subscription. If you choose to work with this, specify a valid user name and password for ArcGIS Online. Each successful request to the service incurs service credits taken from your subscription.</p></div></div><div class="notes" id="GUID-964D690F-6D29-4EDF-9128-C615F27CEDB4"><div class="tip"><img class="note_img" src="rsrc/tip.png" alt="Tip" title="Tip"><span>Tip:</span></div><div class="tipbody"><p id="GUID-210743EA-3FC4-4F18-96C1-5DE0CB246F4C">If you want to share your secure service item with the public, for example, as part of a public web app, store the credentials with the item so the public is not required to log in to get to your app. See <a class="xref" target="_blank" rel="http://server.arcgis.com/en/portal/latest/use/arcgis-server-services.htm" href="http://server.arcgis.com/en/portal/latest/use/arcgis-server-services.htm">ArcGIS Server web services</a> for more information.</p></div></div>

<div class="section1" id="ESRI_SECTION1_4AEA6173BE5D4C7CABA6B0B3661E3373" purpose="section1"><h2>Configure the Directions widget</h2><p id="GUID-DD6B7CCE-FF94-4F2F-9EDA-873C67E2259F">The Directions widget can be set to open automatically when apps start. To do so, click the  dot on the widget to turn it to dark green.</p><p id="GUID-5CF6C729-8A42-426B-BD60-F5ED3091CDAC"> To configure the Directions widget, click the edit icon <img purpose="img" placement="inline" alt="edit icon" title="edit icon" src="03w3/GUID-50375771-FF28-476B-971D-4369D62C01D2-web.png"> on  the widget to open the configuration options dialog box.</p></div><div class="wfsteps" purpose="wfsteps"><h4></h4><div class="steps" id="ESRI_STEPS_212655E9FE6345C49F7A77C59636EEF6"><div class="step_title">Steps:</div><ol><li purpose="step" id="ESRI_STEP_15E66C6AF0724EBFA7BE29D1BB46F471"><span purpose="cmd" id="GUID-C871BC93-A97B-4CBA-85DE-C3742C611543"> By default,  the Route, Geocoder, Travel Modes,  and Traffic Layer URLs are  from your ArcGIS Online organization or the Utility Services of Portal for ArcGIS. The Travel Modes and Traffic Layer URLs are optional. If you don't specify them, the widget will be functional but you will not see the travel and traffic options when using the widget.</span></li><li purpose="step" id="ESRI_STEP_AC6A0B9EBF3648C5BCB04783A297F911"><span purpose="cmd" id="GUID-F64D7C43-65DA-4727-8992-83C7920A2A7D"> Update the geocoder options. Default values populate from the services.</span><div class="substeps" id="ESRI_SUBSTEPS_9CB9DD4C1F5543549D7BEDC851C68469" purpose="substeps"><ol><li purpose="substep" id="ESRI_SUBSTEP_CE85C39379034419B303593ECA4472A2"><span purpose="cmd" id="GUID-DD1B8F66-FCC7-45FA-9B56-D60AE81960E6">Checking <span class="uicontrol">Auto complete</span> allows the search text box to fill in possible addresses automatically by querying the geocoder service.</span></li><li purpose="substep" id="ESRI_SUBSTEP_B01B4D5C8BB84D18853AC9B965DDC3CA"><span purpose="cmd" id="GUID-7BE5F509-EF45-46FD-93F5-CBFE37DC0E51">The <span class="uicontrol">Search delay</span> parameter controls how long the user interface waits after the last key is pressed to attempt to update the list of candidate locations.</span></li><li purpose="substep" id="ESRI_SUBSTEP_04AB296A99894ECFAD55D594E15DADF7"><span purpose="cmd" id="GUID-74385511-8226-4D6A-89DF-2FF0551345D1">The <span class="uicontrol">Max locations</span> controls the number of suggested locations returned from the geocoder service at a time.</span></li><li purpose="substep" id="ESRI_SUBSTEP_79EEBE805AF048BEA8E5717C90DC7205"><span purpose="cmd" id="GUID-BC339123-6167-468E-8AE9-13F338EED1F7">The minimum number of characters required to query for suggested locations is specified by the <span class="uicontrol">Min characters</span> parameter.</span></li><li purpose="substep" id="ESRI_SUBSTEP_2B187C7B907B4B80818EC874D751A596"><span purpose="cmd" id="GUID-CC734D07-415E-43EB-8E88-BC4E877DF032">The <span class="uicontrol">Placeholder</span> text displays in the address lookup text box when no text has been entered.</span></li></ol></div></li><li purpose="step" id="ESRI_STEP_AC2C79D85DEB4329950A01929A893AF8"><span purpose="cmd" id="GUID-8F908B53-6F90-4175-ACCB-42F2A9B64B7D">Update the routing options. Default values populate from the services.</span><div class="substeps" id="ESRI_SUBSTEPS_8D4785CA0F544E80AF822F938B3543AB" purpose="substeps"><ol><li purpose="substep" id="ESRI_SUBSTEP_1D195E1434CB4AF78386400097689FBB"><span purpose="cmd" id="GUID-6A289DFF-C917-444B-AD89-78E6814D6163">The <span class="uicontrol">Directions language</span> is the culture code (for example, en_US for American English, de_DE for German). Output is customized for the specified locale, if available.</span></li><li purpose="substep" id="ESRI_SUBSTEP_1F213F77C91341F3B3D53AF3F94A8A96"><span purpose="cmd" id="GUID-B8A19305-C4FC-4F41-9485-0AEBC7D5F7D0">Control the verbosity of the directions by changing the <span class="uicontrol">Directions output type</span> parameter.</span> </li><li purpose="substep" id="ESRI_SUBSTEP_09EBE3C3DB904FCC8CB7966C11CF979B"><span purpose="cmd" id="GUID-ABC8E3EA-29A7-4E1A-BB8C-FC1D27232FC0">The <span class="uicontrol"> Directions length units</span>   are  the units of measure used when computing direction distances.</span></li><li purpose="substep" id="ESRI_SUBSTEP_069262E5ADAF4B2C868C98B79424AE06"><span purpose="cmd" id="GUID-F98864B7-CB55-4B47-87B8-79D8D4ABFEBA">The <span class="uicontrol">Impedance attribute</span> is the network attribute used for impedance. For example, set it to <span class="uicontrol">Time</span>  for quickest route and <span class="uicontrol">Length</span> for shortest drive if the service has these attributes available.  With an empty array, it defaults to the default of the service.</span></li></ol></div></li><li purpose="step" id="ESRI_STEP_3133F7C5D1BB4782B3C8B8915662B4B4"><span purpose="cmd" id="GUID-0ECFDA87-7BB0-44DA-85D9-55201D9E2F2F"> Click <span class="uicontrol">OK</span> to close the dialog box.</span></li></ol></div></div><div class="section1" id="ESRI_SECTION1_6DA44CE7B35044ADA3BD03D697F875FB" purpose="section1"><h2>Use the Directions widget</h2><div class="notes" id="GUID-429DC676-55AC-4EB0-86D3-89ABE77151DF"><div class="caution"><img class="note_img" src="rsrc/caution.png" alt="Caution" title="Caution"><span>Caution:</span></div><div class="tipbody"><p id="GUID-18518665-B7EC-4021-95C1-5396DB5C2DCB"> Using the ArcGIS Online Network Analysis Services consumes credits. Verify that you are signed in to your organization with <a class="xref" target="_blank" rel="http://server.arcgis.com/en/portal/latest/administer/windows/roles.htm" href="http://server.arcgis.com/en/portal/latest/administer/windows/roles.htm">privileges</a> to perform network analysis.</p></div></div></div><div class="wfsteps" purpose="wfsteps"><h4></h4><div class="steps" id="ESRI_STEPS_43A546FB0C614534905BD5CDE81DCE87"><div class="step_title">Steps:</div><ol><li purpose="step" id="ESRI_STEP_00E333ECA73F4E88B3F5DB767B5017F1"><span purpose="cmd" id="GUID-CE9A463A-C73E-4D0A-9564-9402D1988D01">Click the directions icon to open the Directions widget.</span></li><li purpose="step" id="ESRI_STEP_4E0E3966DE084896825C238AE68F0130"><span purpose="cmd" id="GUID-1269AE65-993A-47C1-A2E6-20EA0DC9555E">Enter the start and end destinations.</span><ul purpose="choices" id="ESRI_CHOICES_BF31C35809D64ADCBEEFF3C49B53D45C"><li purpose="choice" id="ESRI_CHOICE_EA7FADD7B4004358B0D19B5EC495D62E">You can type the addresses in the fields, which may autocomplete addresses and locations, depending on the configuration.</li><li purpose="choice" id="ESRI_CHOICE_922DF3E9DF1A4A23AA9C502D1E33B9CA">You can add destinations by clicking the <img purpose="img" placement="inline" alt="Add destinations by clicking the map" title="Add destinations by clicking the map" src="03w3/GUID-E5CD64E7-E5E4-435F-828F-BF2BEA67C646-web.png"> icon to enable it, and clicking the map.</li></ul></li><li purpose="step" id="ESRI_STEP_69BD832D0D8748AD8BCE3CE35AC2A060"><span purpose="cmd" id="GUID-98D1474C-AA23-4ACD-97F8-FE262E8A6667"> Optionally, add more destinations by clicking <span class="uicontrol">Add destination</span>. Each destination can also be dragged onto the map.</span></li><li purpose="step" id="ESRI_STEP_86F2A9C66B68488AA89041BEB22146CA"><span purpose="cmd" id="GUID-652617B9-D707-4A0C-997A-461B86E701EF">Select a travel mode from the drop-down list.<div class="image" purpose="image"><table><tr><td><img class="break" src="03w3/GUID-39654E29-F2DF-4B90-89C0-3329BB6F5EE8-web.png" purpose="img" alt="Travel mode" title="Travel mode"></td></tr></table></div></span></li><li purpose="step" id="ESRI_STEP_4ADD1D226024473CAAF6C406F9A502EA"><span purpose="cmd" id="GUID-7BD94FA6-0841-489F-93C3-49C2E53C9FF8">Click <span class="uicontrol">Show More Options</span> to display more options. Checking <span class="uicontrol">Return to start</span> automatically calculates directions from the last destination to the first destination as part of the results. Checking <span class="uicontrol">Use traffic</span> factors in real-time impedance from a traffic service when calculating the least-cost path between two destinations. Toggle between <span class="uicontrol">MI</span> (miles) and <span class="uicontrol">KM</span> (kilometers) to control the units used to report distances in the generated set of directions. Toggle between <span class="uicontrol">Fastest</span> and <span class="uicontrol">Shortest</span> to choose your preferred route.</span></li><li purpose="step" id="ESRI_STEP_EC87946C62304FF8A49511BBCAB3F6CE"><span purpose="cmd" id="GUID-F49E4806-AEF5-4925-B326-3707C2893516"> Click  <span class="uicontrol">Get Directions</span>.</span></li></ol></div><div class="result" id="ESRI_RESULT_E821D25CB1124E99AA77E0BFCEBADA88" purpose="result"><p id="GUID-A21AE5F6-8B1F-45E3-9F55-B05CE5EAD5D7">
 The map updates to display the route and directions display in the Directions widget.<div class="image" purpose="image"><table><tr><td><img class="break" src="03w3/GUID-E9BBEA5E-E9CD-4DAA-A645-FB1184E0EA0D-web.png" purpose="img" alt="Get directions" title="Get directions"></td></tr></table></div>
</p><p id="GUID-8B72B037-09AA-432F-8967-15A395DD7942"> Each turn in the directions list is interactive. Click a turn to zoom to that location on the map. The route leading to that turn also highlights on the map.</p><div class="image" purpose="image"><table><tr><td><img class="break" src="03w3/GUID-4F592821-04CB-4026-97CF-272AAB24BCE0-web.png" purpose="img" alt="Directions with highlighted turn" title="Directions with highlighted turn"></td></tr></table></div><p id="GUID-1083E7A4-D91B-4649-B383-4D0B8441EAEC"> Clicking the print icon <img purpose="img" placement="inline" alt="Print icon" title="Print icon" src="03w3/GUID-C06638F5-6E48-465A-BB29-BC8A038A7FE1-web.png"> opens the directions in a new window for printing.</p><p id="GUID-6251DB85-C29E-440C-ACFB-3A87E6E06C2F"> To clear the current set of directions from the map, click <span class="uicontrol">Clear</span> below the destinations list.</p></div></div>
<div class="footer"> Copyright © 1995-2016 Esri. All rights reserved. </div></div></body></html>